import requests


class IhrmLogin(object):

    def loginapi(self, req_body):
        resp = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                             headers={"Content-Type": "application/json"},
                             json=req_body)
        return resp


if __name__ == '__main__':
    api = IhrmLogin()
    req_body = {"mobile": "13800000002", "password": "123456"}
    resp = api.loginapi(req_body)
    print(resp.json())
